﻿namespace IslandUnit
{
    public abstract class StubAction<TDependency> : IDependencySetupFlow where TDependency : class
    {
        protected Dependency<TDependency> Dependency;

        /// <summary>
        /// Returns to the <see cref="ICreateIsolation&lt;TDependency&gt;"/>, to
        /// permit the flow of fluent interface.
        /// </summary>
        /// <returns>The <see cref="ICreateIsolation&lt;TDependency&gt;"/> of your dependency.</returns>
        public ICreateIsolation<TDependency> And()
        {
            return this.Dependency;
        }

        /// <summary>
        /// Returns to the <see cref="Isolator"/>, to
        /// permit the flow of fluent interface.
        /// </summary>
        /// <returns>The <see cref="Isolator"/> of your dependency.</returns>
        public IDependencySetup Then()
        {
            return this.Dependency.Isolator;
        }
    }
}
